package com.carbon.vo;

import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.List;

/**
 * 图片信息识别
 *
 * @author WangFK
 * @version 1.0
 * @since 2023/9/13 8:20
 */

public class GenralBasicOCRVO  implements Serializable{
    private static final long serialVersionUID = 1L;
    private List<TextDetections> TextDetections;
    private String Language;
    private double Angel;
    private int PdfPageSize;
    private double Angle;
    private String RequestId;

    public GenralBasicOCRVO(List<GenralBasicOCRVO.TextDetections> textDetections, String language, double angel, int pdfPageSize, double angle, String requestId) {
        TextDetections = textDetections;
        Language = language;
        Angel = angel;
        PdfPageSize = pdfPageSize;
        Angle = angle;
        RequestId = requestId;
    }

    public GenralBasicOCRVO() {
    }

    public List<GenralBasicOCRVO.TextDetections> getTextDetections() {
        return TextDetections;
    }

    public void setTextDetections(List<GenralBasicOCRVO.TextDetections> textDetections) {
        TextDetections = textDetections;
    }

    public String getLanguage() {
        return Language;
    }

    public void setLanguage(String language) {
        Language = language;
    }

    public double getAngel() {
        return Angel;
    }

    public void setAngel(double angel) {
        Angel = angel;
    }

    public int getPdfPageSize() {
        return PdfPageSize;
    }

    public void setPdfPageSize(int pdfPageSize) {
        PdfPageSize = pdfPageSize;
    }

    public double getAngle() {
        return Angle;
    }

    public void setAngle(double angle) {
        Angle = angle;
    }

    public String getRequestId() {
        return RequestId;
    }

    public void setRequestId(String requestId) {
        RequestId = requestId;
    }

    public class ItemPolygon {

        private int X;
        private int Y;
        private int Width;
        private int Height;

        public ItemPolygon(int x, int y, int width, int height) {
            X = x;
            Y = y;
            Width = width;
            Height = height;
        }

        public ItemPolygon() {
        }

        public int getX() {
            return X;
        }

        public void setX(int x) {
            X = x;
        }

        public int getY() {
            return Y;
        }

        public void setY(int y) {
            Y = y;
        }

        public int getWidth() {
            return Width;
        }

        public void setWidth(int width) {
            Width = width;
        }

        public int getHeight() {
            return Height;
        }

        public void setHeight(int height) {
            Height = height;
        }
    }

    public class Polygon {

        private int X;
        private int Y;

        public int getX() {
            return X;
        }

        public int getY() {
            return Y;
        }

        public void setY(int y) {
            Y = y;
        }

        public Polygon() {
        }

        public Polygon(int x, int y) {
            X = x;
            Y = y;
        }

        public void setX(int X) {
            this.X = X;
        }
    }

    public class TextDetections {

        private String DetectedText;
        private int Confidence;
        private List<Polygon> Polygon;
        private String AdvancedInfo;
        private ItemPolygon ItemPolygon;
        private List<String> Words;
        private List<String> WordCoordPoint;

        public String getDetectedText() {
            return DetectedText;
        }

        public void setDetectedText(String detectedText) {
            DetectedText = detectedText;
        }

        public int getConfidence() {
            return Confidence;
        }

        public void setConfidence(int confidence) {
            Confidence = confidence;
        }

        public List<GenralBasicOCRVO.Polygon> getPolygon() {
            return Polygon;
        }

        public void setPolygon(List<GenralBasicOCRVO.Polygon> polygon) {
            Polygon = polygon;
        }

        public String getAdvancedInfo() {
            return AdvancedInfo;
        }

        public void setAdvancedInfo(String advancedInfo) {
            AdvancedInfo = advancedInfo;
        }

        public GenralBasicOCRVO.ItemPolygon getItemPolygon() {
            return ItemPolygon;
        }

        public void setItemPolygon(GenralBasicOCRVO.ItemPolygon itemPolygon) {
            ItemPolygon = itemPolygon;
        }

        public List<String> getWords() {
            return Words;
        }

        public void setWords(List<String> words) {
            Words = words;
        }

        public List<String> getWordCoordPoint() {
            return WordCoordPoint;
        }

        public void setWordCoordPoint(List<String> wordCoordPoint) {
            WordCoordPoint = wordCoordPoint;
        }

        public TextDetections(String detectedText, int confidence, List<GenralBasicOCRVO.Polygon> polygon, String advancedInfo, GenralBasicOCRVO.ItemPolygon itemPolygon, List<String> words, List<String> wordCoordPoint) {
            DetectedText = detectedText;
            Confidence = confidence;
            Polygon = polygon;
            AdvancedInfo = advancedInfo;
            ItemPolygon = itemPolygon;
            Words = words;
            WordCoordPoint = wordCoordPoint;
        }

        public TextDetections() {
        }
    }


}
